﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="per_me_tanchu.aspx.cs" Inherits="per_me_tanchu" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>个人中心-我的定制</title>
    <link type="text/css" href="css/per_tanchu.css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>  
     
    <!--[if IE 6]>
    <script src="../js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
    <script type="text/javascript">
    DD_belatedPNG.fix('*');
    </script>
    <![endif]-->
    <script language="javascript"> 
        function setAppointtype(state, id) { 
            jQuery.ajax({
                url: "Ajax/MemberLogin.ashx",
                data: { t: 'setAppointtype', sa: state, ii: id },
                type: "POST",
                success: function (data) { 
                    if (data + '' == 'True' || data + '' == 'true') {
                        //window.location.href = window.location.href;
                        $("#serachBtn").click();
                    } else {
                        alert("数据错误！");
                    }
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <!--Start-->
    <div class="per_tanchu_t">
        <h2>跟单人数<em><%=userCount%></em>人，每期跟单总金额约<em><%=userMoney%></em>元</h2>
        <div class="per_tanchu_s">
            跟单人：
            <asp:Button ID="serachBtn" runat="server" Text="搜 索" CssClass="per_btn" 
                onclick="serachBtn_Click" />
            <asp:TextBox ID="userNametxt" runat="server" CssClass="per_input"></asp:TextBox>
        </div>
    </div>
    <!--Title-->
    <ul class="per_tanchu_ul_t">
        <li class="p1">序号</li>
        <li class="p2">用户名</li>
        <li class="p3">类型</li>
        <li class="p4">跟单金额	</li>
        <li class="p5">定制时间</li>
        <li class="p6" style="width: 109px">操作</li>
    </ul>
    <div class="per_tanchu_box">
    <%if (dt != null && dt.Count > 0)
      {
          for (int i = 0; i < dt.Count; i++)
          {%>
        <ul class="per_tanchu_ul_con">
            <li class="p1"><%=i+1 %></li>
            <li class="p2"> <%if (Convert.ToInt16(dt[i].Appointtype) == 1)
                              {%><em><%} %><%=getUserName(dt[i].UserID)%>
                              <%if (Convert.ToInt16(dt[i].Appointtype) == 1)
                              {%></em><%} %></li>
            <li class="p3">每期跟</li>
            <li class="p4"><%=dt[i].MySub%></li>
            <li class="p5"><%=dt[i].AddTime%></li> 
            <li class="p6">
            <%if (Convert.ToInt16(dt[i].Appointtype) == 0)
              {%>
            <a href="javascript:setAppointtype(1,<%=dt[i].id%>)" class="set_on lnk">指定跟单</a><%}
              else
              {%><a href="javascript:setAppointtype(0,<%=dt[i].id%>)" class="clear_set lnk">取消指定</a>
            <%} %>
            </li>
        </ul> 
        <%}
      }%>
    </div>
    <!--MainEnd-->
    <div class="per_tanchu_infor">
        <p>1、*标红用户为指定跟单人</p>
        <p>2、用户可通过指定跟单来提高该用户的跟单优先级（最多不超过10名指定跟单人）</p>
    </div>
    <ul class="per_pages">
       <webdiyer:aspnetpager SubmitButtonClass="buttons"  ID="AspNetPager1" 
                    runat="server" AlwaysShow="True"  
                        NextPageText="下一页" PrevPageText="前一页"   PageSize="10"  
                        OnPageChanged="AspNetPager1_PageChanged">
                    </webdiyer:aspnetpager>
    </ul>
    <!--End-->
    </div>
    </form>
</body>
</html>
